import isEmail from 'validator/lib/isEmail'
import isURL from 'validator/lib/isURL'
import isMobilePhone from 'validator/lib/isMobilePhone'
import isIdentityCard from 'validator/lib/isIdentityCard'

// 官方文档：https://www.npmjs.com/package/validator?activeTab=readme

export const validator = {
  isEmail,
  isURL,
  isMobilePhone,
  isIdentityCard
}

export default function (app) {
  app.config.globalProperties.$validator = validator
}
